home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus Extra 1996 #5
/
Amiga Plus Extra 1996 May.iso
/
editoren
/
gmplay_v0.9b
/
gmplay.doc
< prev
next >
Wrap
Text File
|
1996-08-01
|
11KB
|
326 lines
GMPlay v0.9 beta
----------------
MIDI file player and General MIDI tone generator emulation
(c) 1995,1996 Sonic Dreams Software
INTRODUCTION
------------
I often heard from PeeCee users:
"You can't play MIDI files on your Amiga without external MIDI hardware,
and my SoundFucker card is cheaper! Ha ha ha".
But since a Turing machine could easily emulate a Cray supercomputer,
here it comes this buggy program called GMPlay.
I got it working over a year ago, but only now I decided to release it,
because the new improved version is working but not completely clean
and ready.
All you need is a FAST Amiga, and MIDI files will come straight from the
old good Paula to your ears.
FEATURES
--------
- Full emulation of a General MIDI tone generator
- Up to 32 voices polyphony with dynamic allocation
- Selectable playback sample rate
- Volume/PanPot/Expression/Sustain controls emulation
- Pitch Bender/Bend Range emulation
- Up to 64 drum samples
- Up to 128 instrument samples
- Use standard 8SVX samples (one octave only)
- Fibonacci Delta packed samples support
- MIDI file formats 0 and 1 compatible
- Up to 32 tracks
REQUIREMENTS
------------
- OS2.0 or higher
- 68020 processor or higher
- 1MB or more CHIP memory
- FAST memory highly recomended
- A 50MHz 68060 CPU is required if you wanna take full advantage
of using highest audio sampling rate...
DISCLAIMER
----------
WARNING: I'm not responsible for any loss or damage caused by this program
to your software, your hardware, your house, or your life, even if you use
it in perfect respect of my directions.
YOU CAN USE THE PROGRAM AS IS, AT YOUR OWN RISK.
You can freely distribute this program for non-commercial purposes only,
but you must not modify the archive contents.
However you can replace instrument samples in your installation to fit
your own taste.
COMMERCIAL DISTRIBUTION OR INCLUDING IN MAGAZINES OR COVER DISKS
IS FORBIDDEN WITHOUT MY WRITTEN PERMISSION.
Explicit permission to Fred Fish and Urban Dominik Müller to include
this software on Fish disks, Aminet and Aminet CDs.
Thanks for keeping Amiga alive, guys.
INSTALLATON
-----------
Extract the files in the archive in a directory of your choice, then
assign GM: to point to that dir. For example:
Assign GM: Work:GMPlayer
You may want to make this assignment at boot time by inserting it in your
S:user-startup.
USING GM PLAYER
---------------
Using GMPlay is pretty simple, just type:
GM:GMPlay <filename> [options]
where <filename> is the name of a standard MIDI file (try GM:Songs/Test),
and .MID extension is not necessary.
You can use the following options:
-v<volume> Change master volume (range 0..64 - default 64)
Lets you adjust output level not to hurt somebody if you connect your
Amiga to a volume-less 100.000 watts amplifier.
-r<rate> Change playback rate (range 3608..57734 - default 16726 Hz)
A higher rate requires a faster machine.
Also remember that you MUST use a 31 KHz video mode to break the limit
of the audio DMA bandwidth (28867 Hz).
-b<buffer> Change the output buffer size (range 32..128 - default 64 KB)
The value you supply stand for ONE buffer, but remember that the
program use FOUR times this value to do stereo double buffering.
Giving a value of 128 will eat 512 KB of your CHIP mem.
Larger buffers may improve playing on complex songs, but also cause
you to wait longer if you want to stop playing (see LIMITATIONS).
-g<gain> Change the output gain (range -3..+3 - default 0 = 0 dB)
This let you change digital mix gain from -18 dB to +18 dB to prevent
very loud songs from clipping when forced to 8-bit output. Lower gain
if you hear distortion, or raise it if the song sounds too soft.
-p<poly> Change emulation polyphony (range 8..32 - default 24 = GM std)
This option was included to speed up emulation on playing very simple
songs. Since oscillators are now managed by a linked list, the effect
on program performance is almost null. You can still use this option
to limit the maximum number of voices, or if you need more than 24.
-f Turn FAST mode on (default normal mode)
FAST mode disables stereo mix and audio data bounds check to increase
efficiency. If the voice mix lead to an overflow, you'll probably get
noise since audio data is no longer clipped to maximum or minimum value.
If this happens, try lowering gain with the -g option.
-m Leave multi-tasking enabled (default disabled)
The program use Forbid() and Permit() calls to tell the other tasks to
leave him alone during calculations. If you own a fast machine and you're
bored by the jumpy mouse pointer, use this option.
-i Prints out some info about song (default OFF)
This option show you parameters and other song information before song
starts playing. In this pre-release you will see also debug printf() calls
during play, so it's not recomended for speed. If you don't want any
output you can redirect the command to NIL: as follows:
GMPlay >NIL: <filename> [options]
HINTS AND TIPS
--------------
- If the song comes out "not what you call smooth" try one (or two)
of the following things:
- Turn on fast mode
- Lower playback rate
- Increase buffer size
- Buy a faster machine :-(
- Buy a GM tone generator 8-((
- Eat your MIDI disks and sing it out loud... :-o<((
- To stop playing, press CTRL-C inside the output window (then wait...)
or issue a break command to GMPlay process.
- When a sample is not located GMPlay tries to load the default sample,
that is GM:Tones/Piano for instruments and GM:Drums/RimShot for drums.
Those samples MUST exist or the program will abort.
- You may want to use GMPlay from your favourite disk utility program.
This example shows how to call GMPlay from DiskMaster II.
First add this line to DiskMaster's configuration script:
AddAutoCmd MThd,Extern GM:GMPlay %s
...then run DiskMaster II and just double-click a MIDI file to hear it!
ABOUT MAPS:
-----------
The files named ToneMap.dat and DrumMap.dat contain the drum kit and
instrument set definition.
You can edit the maps with a binary disk editor, or try to match them
with your own samples.
Here's a brief description of map structure:
Each entry of the map is 16 bytes long.
Starting from byte 0 of each 16-byte group, you find the name of the
sample. You should not exceed the first 12 bytes including a zero to
terminate string. If you put a 0 in the first byte any program change
to that entry will be ignored.
- Tone map:
Contain 128 entries. Each row have the following format:
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
\_____________________/ \___/ |
| | |
NAME RSV FLAG
NAME: Sample name (path is GM:Tones/).
RSV : Reserved field.
FLAG: A flag indicating decay length varying with the pitch (like piano
and other percussive instruments). This is not yet implemented.
- DrumMap:
Contain 64 entries. Each row have the following format:
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
\_____________________/ \_/ | |
| | | |
NAME | RSV|
LINK POS
NAME: Sample name (path is GM:Drums/).
LINK: Two exclusive links with other drums. In other words when that
sample is played, any other occurrence of the same sample, or any
occurrence of a linked sample is muted. For example, a closed or
pedal high hat should mute a open one to get a realistic result.
Zero means no link.
RSV : Reserved field.
POS : Stereo position for that drum (Note that drum samples stereo
position is not affected by pan-pot control on channel #10, but
only by this setting).
WARNING: All this stuff is subject to changes prior to final release!!!
KNOWN BUGS
----------
(Before you start sending me mail-packed nuclear weapons...
...have you read the DISCLAIMER???)
- The program will allocate all audio channels even if two are used.
This will come useful when I'll do 14-bit output on my PowerPC equipped
Amiga 6000.
- The program will crash your machine with some complex song files.
This happens since I modified most of the code and then totally crashed
my old 40MB haed-drive, according strictly with the Murphy's law!
Now I'm trying to get the new sources working before my 70th birthday.
LIMITATIONS
-----------
- No multiple drum kits.
- Modulation control change not supported.
- Envelopes added on v0.7 and later removed.
This mean no release stage after a note off command, and also unwanted
sustain on piano-like instruments.
I'm working to add all three features to the final release.
- No graphical interface
- The program doesn't stop immediately
I've tried to do everything system friendly, but I'm not so deep in system
programming and my documentation is poor and obsolete.
If you have suggestions or you want to build a graphical interface, please
contact me.
- Supplied samples are noisy
All supplied samples were taken with a cheap 8-bit sampler.
Anyone who own a 16-bit sampler can grab 16-bit samples and then convert
them to 8-bit, eliminating noise completely.
- Slow on basic machines (A1200 or even A3000).
The output calculation is already hand optimized 020+ assembly.
If you need to play just classical piano songs (with one or two tracks)
it should work fine. Using GMPlay on my 50 Mhz 68030 I'm able to play most
but not all multi-tracked tunes.
A new version of the program, using FAST mem buffers and other brand new
tricks (OS legal, I hope!) is under development.
It will bring to FAST mem owners more than twice the current calc speed.
For systems with CHIP mem only, there's just a triple-buffers scheme that
I left off that could help.
- No DSP effects emulation
Wadda ya want from me, man???
Maybe available in release 999.9, before late spring 2013!!!
HISTORY
-------
0.9 beta - Finished May 7,1995 - Released February 7,1996 :-(((
ABOUT SONIC DREAMS SOFTWARE
---------------------------
Code and "Crazy" song written by Alessandro De Luca.
Fibonacci unpack routine based on Emanuele Viola's work published
on Amiga Magazine #60.
This program is FREEWARE (NOT PUBLIC DOMAIN!!!).
If you find it useful, send me a money donation to encourage further
development of this and other projects.
Snail:
Alessandro De Luca
Via degli Oleandri s/n
98035 Giardini Naxos (ME)
ITALY
E-Mail:
hairy@asterix.unime.it